package cn.ad.server.domain.ad;

import cn.ad.server.domain.enumration.AdFormat;

import java.io.Serializable;
import java.util.Date;

public class Ratio implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4910309232542567108L;

	static final String VERSION = "0";
	static final String CACHE_NAME = "ratio";

	private int id;
	private String name;
	private String value;
	private Date createTime;
	private int status;
	private Date updateTime;
	private AdFormat adFormat;

	public static String cacheKey(long id) {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(id).toString();
	}

	public String toCacheKey() {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(this.getId()).toString();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public AdFormat getAdFormat() {
		return adFormat;
	}

	public void setAdFormat(AdFormat adFormat) {
		this.adFormat = adFormat;
	}
}
